﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using App.Data;
using App.Model;
using App.Domain.Contracts;
using App.Domain.Shared;

namespace App.Domain.Handlers
{
    public class GetLovsAll
    {
        private readonly ILovRepository _lovsRepository;

        public GetLovsAll(ILovRepository lovsRepository)
        {
            _lovsRepository = lovsRepository;
        }

        public IQueryable<Lov> Execute()
        {
            try
            {
                return _lovsRepository.GetAll();
            }
            catch (InvalidOperationException ex)
            {
                throw new BusinessServicesException("UnableToRetrieveReminderExceptionMessage", ex);
            }
        }
    }
}
